<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>OrbbecSDK: header_cn/libobsensor/hpp/RecordPlayback.hpp 源文件</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="orbbec_icon.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">OrbbecSDK
   &#160;<span id="projectnumber">1.8.3</span>
   </div>
   <div id="projectbrief">OrbbecSDK: 奥比中光 3D 相机开发套件</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>首页</span></a></li>
      <li><a href="pages.html"><span>相关页面</span></a></li>
      <li><a href="namespaces.html"><span>命名空间</span></a></li>
      <li><a href="annotated.html"><span>类</span></a></li>
      <li class="current"><a href="files.html"><span>文件</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="搜索" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>文件列表</span></a></li>
      <li><a href="globals.html"><span>文件成员</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_9a5345e98321307492e41331ab8e5636.html">header_cn</a></li><li class="navelem"><a class="el" href="dir_a57403e30bad3723557b0550251f8216.html">libobsensor</a></li><li class="navelem"><a class="el" href="dir_8243e961fc5f523c63be320c0718524a.html">hpp</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">RecordPlayback.hpp</div>  </div>
</div><!--header-->
<div class="contents">
<a href="RecordPlayback_8hpp.html">浏览该文件的文档.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;</div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="preprocessor">#pragma once</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;</div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="Types_8hpp.html">Types.hpp</a>&quot;</span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="preprocessor">#include &lt;memory&gt;</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;</div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="keyword">struct </span>RecorderImpl;</div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="keyword">struct </span>PlaybackImpl;</div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;</div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespaceob.html">ob</a> {</div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="keyword">class </span>Device;</div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="keyword">class </span>Frame;</div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="keyword">class </span>DeviceInfo;</div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;</div><div class="line"><a name="l00018"></a><span class="lineno"><a class="line" href="namespaceob.html#a122b204df3efecf2e12fb80f5460ee9d">   18</a></span>&#160;<span class="keyword">using</span> <a class="code" href="namespaceob.html#a122b204df3efecf2e12fb80f5460ee9d">PlaybackCallback</a>   = std::function&lt;void(std::shared_ptr&lt;Frame&gt; frame)&gt;;</div><div class="line"><a name="l00019"></a><span class="lineno"><a class="line" href="namespaceob.html#ae29255b85156f0e0b1fea84b4f1e1536">   19</a></span>&#160;<span class="keyword">using</span> <a class="code" href="namespaceob.html#ae29255b85156f0e0b1fea84b4f1e1536">MediaStateCallback</a> = std::function&lt;void(OBMediaState state)&gt;;</div><div class="line"><a name="l00024"></a><span class="lineno"><a class="line" href="classob_1_1Recorder.html">   24</a></span>&#160;<span class="keyword">class </span><a class="code" href="ObTypes_8h.html#aa0add2ff45ff52cc75dc92d44f883fbf">OB_EXTENSION_API</a> <a class="code" href="classob_1_1Recorder.html">Recorder</a> {</div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="keyword">private</span>:</div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;    std::unique_ptr&lt;RecorderImpl&gt; impl_;</div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;</div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;    <a class="code" href="classob_1_1Recorder.html">Recorder</a>();</div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;    <a class="code" href="classob_1_1Recorder.html">Recorder</a>(std::unique_ptr&lt;RecorderImpl&gt; impl);</div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;</div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;    <a class="code" href="classob_1_1Recorder.html">Recorder</a>(std::shared_ptr&lt;Device&gt; device);</div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;</div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;    <span class="keyword">virtual</span> ~<a class="code" href="classob_1_1Recorder.html">Recorder</a>() noexcept;</div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;</div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;    <span class="keywordtype">void</span> start(<span class="keyword">const</span> <span class="keywordtype">char</span> *filename, <span class="keywordtype">bool</span> async = <span class="keyword">false</span>);</div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;</div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;    <span class="keywordtype">void</span> stop();</div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;</div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;    <span class="keywordtype">void</span> write(std::shared_ptr&lt;Frame&gt; frame);</div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;};</div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;</div><div class="line"><a name="l00068"></a><span class="lineno"><a class="line" href="classob_1_1Playback.html">   68</a></span>&#160;<span class="keyword">class </span><a class="code" href="ObTypes_8h.html#aa0add2ff45ff52cc75dc92d44f883fbf">OB_EXTENSION_API</a> <a class="code" href="classob_1_1Playback.html">Playback</a> {</div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;<span class="keyword">private</span>:</div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;    std::unique_ptr&lt;PlaybackImpl&gt; impl_;</div><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;</div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;    <a class="code" href="classob_1_1Playback.html">Playback</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> *filename);</div><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;    <a class="code" href="classob_1_1Playback.html">Playback</a>(std::unique_ptr&lt;PlaybackImpl&gt; impl);</div><div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;    <span class="keyword">virtual</span> ~<a class="code" href="classob_1_1Playback.html">Playback</a>() noexcept;</div><div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;</div><div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;    <span class="keywordtype">void</span> start(<a class="code" href="namespaceob.html#a122b204df3efecf2e12fb80f5460ee9d">PlaybackCallback</a> callback, <a class="code" href="ObTypes_8h.html#aea80b2bb24e04f8d79c49b29ba6094fd">OBMediaType</a> type = <a class="code" href="ObTypes_8h.html#aea80b2bb24e04f8d79c49b29ba6094fda366f5a92167a4bdd3c4ec222b2f131ab">OB_MEDIA_ALL</a>);</div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;</div><div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;    <span class="keywordtype">void</span> stop();</div><div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;</div><div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;    <span class="keywordtype">void</span> setPlaybackStateCallback(<a class="code" href="namespaceob.html#ae29255b85156f0e0b1fea84b4f1e1536">MediaStateCallback</a> state);</div><div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;</div><div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;    std::shared_ptr&lt;DeviceInfo&gt; getDeviceInfo();</div><div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;</div><div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;    <a class="code" href="structOBCameraParam.html">OBCameraParam</a> getCameraParam();</div><div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;};</div><div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;</div><div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;}  <span class="comment">// namespace ob</span></div><div class="ttc" id="classob_1_1Recorder_html"><div class="ttname"><a href="classob_1_1Recorder.html">ob::Recorder</a></div><div class="ttdoc">Recorder 类, 实现帧录制功能 </div><div class="ttdef"><b>Definition:</b> <a href="RecordPlayback_8hpp_source.html#l00024">RecordPlayback.hpp:24</a></div></div>
<div class="ttc" id="namespaceob_html"><div class="ttname"><a href="namespaceob.html">ob</a></div><div class="ttdef"><b>Definition:</b> <a href="Context_8hpp_source.html#l00014">Context.hpp:14</a></div></div>
<div class="ttc" id="structOBCameraParam_html"><div class="ttname"><a href="structOBCameraParam.html">OBCameraParam</a></div><div class="ttdoc">相机参数 </div><div class="ttdef"><b>Definition:</b> <a href="ObTypes_8h_source.html#l00368">ObTypes.h:368</a></div></div>
<div class="ttc" id="Types_8hpp_html"><div class="ttname"><a href="Types_8hpp.html">Types.hpp</a></div><div class="ttdoc">提供 SDK 的结构体、枚举常量定义（依赖 libobsensor/h/ObTypes.h） </div></div>
<div class="ttc" id="namespaceob_html_a122b204df3efecf2e12fb80f5460ee9d"><div class="ttname"><a href="namespaceob.html#a122b204df3efecf2e12fb80f5460ee9d">ob::PlaybackCallback</a></div><div class="ttdeci">std::function&lt; void(std::shared_ptr&lt; Frame &gt; frame)&gt; PlaybackCallback</div><div class="ttdef"><b>Definition:</b> <a href="RecordPlayback_8hpp_source.html#l00018">RecordPlayback.hpp:18</a></div></div>
<div class="ttc" id="ObTypes_8h_html_aea80b2bb24e04f8d79c49b29ba6094fd"><div class="ttname"><a href="ObTypes_8h.html#aea80b2bb24e04f8d79c49b29ba6094fd">OBMediaType</a></div><div class="ttdeci">OBMediaType</div><div class="ttdoc">录制回放数据类型 </div><div class="ttdef"><b>Definition:</b> <a href="ObTypes_8h_source.html#l00548">ObTypes.h:548</a></div></div>
<div class="ttc" id="classob_1_1Playback_html"><div class="ttname"><a href="classob_1_1Playback.html">ob::Playback</a></div><div class="ttdoc">Playback 类, 实现帧回放功能 </div><div class="ttdef"><b>Definition:</b> <a href="RecordPlayback_8hpp_source.html#l00068">RecordPlayback.hpp:68</a></div></div>
<div class="ttc" id="namespaceob_html_ae29255b85156f0e0b1fea84b4f1e1536"><div class="ttname"><a href="namespaceob.html#ae29255b85156f0e0b1fea84b4f1e1536">ob::MediaStateCallback</a></div><div class="ttdeci">std::function&lt; void(OBMediaState state)&gt; MediaStateCallback</div><div class="ttdef"><b>Definition:</b> <a href="RecordPlayback_8hpp_source.html#l00019">RecordPlayback.hpp:19</a></div></div>
<div class="ttc" id="ObTypes_8h_html_aa0add2ff45ff52cc75dc92d44f883fbf"><div class="ttname"><a href="ObTypes_8h.html#aa0add2ff45ff52cc75dc92d44f883fbf">OB_EXTENSION_API</a></div><div class="ttdeci">#define OB_EXTENSION_API</div><div class="ttdef"><b>Definition:</b> <a href="ObTypes_8h_source.html#l00025">ObTypes.h:25</a></div></div>
<div class="ttc" id="ObTypes_8h_html_aea80b2bb24e04f8d79c49b29ba6094fda366f5a92167a4bdd3c4ec222b2f131ab"><div class="ttname"><a href="ObTypes_8h.html#aea80b2bb24e04f8d79c49b29ba6094fda366f5a92167a4bdd3c4ec222b2f131ab">OB_MEDIA_ALL</a></div><div class="ttdef"><b>Definition:</b> <a href="ObTypes_8h_source.html#l00560">ObTypes.h:560</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
生成于 2023年 十一月 24日 星期五 10:56:17 , 为 OrbbecSDK使用  &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
</small></address>
</body>
</html>
